<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@include file="/WEB-INF/jsp/include/header.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<title>仓储管理系统</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.7.1.min.js"></script>
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui-1.2.5/themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui-1.2.5/themes/icon.css">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/table.css">
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/locale/easyui-lang-zh_CN.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/plugins/jquery.validatebox.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/validatebox.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/pur/purmg.js"></script> 
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/globalMaps.js"></script>
		<script type="text/javascript">
			<c:forEach items="${globalUmUser.mdafs}" var="mdaf" varStatus="s">
				globalMaps.put('${mdaf}', '${mdaf}');
			</c:forEach>
		</script>
	</head>
<body>
<div style="padding:10px;height:98%;">
	<table id="purmgTable" title="发货单管理" border="0" cellspacing="0" cellpadding="0" iconCls="icon-tip" width="98%" pagination="true" remoteSort="false" singleSelect="true" idField="mgab" showFooter="false" striped="true" url="<c:url value='/purmg/purmgList.xhtml'/>">
		<thead>
			<tr align="center">
				<th field="mgaa" width="70">发货单单别</th>
				<th field="mgab" width="80">发货单单号</th>
				<th field="mgac" width="80" formatter='mgacFormater'>状态</th>
				<th field="mgad" width="80">单据日期</th>
			</tr>
		</thead>
	</table>
</div>
<div id="purmgSearch" class="easyui-window" title="查询" style="padding:5px;width:400px;height:350;" iconCls="icon-search" closed="true" maximizable="false" minimizable="false" collapsible="true">
	<form method="post" name="searchForm" id="searchForm">
		<div class="ToolTip_Form" id="purmgSearchForm" onkeydown="if(event.keyCode==13){searchPurmg();}">
			<table>
				<tr>
					<td align="right">发货单单别:</td>
					<td align="left">
						<select id="searchMgaa" name="mgaa" style="width:150px" class="easyui-combobox">
							<option value="">请选择</option>
								<c:if test="${allCmsmjList != null}">
									<c:forEach var="item" items="${allCmsmjList}" varStatus="num">
										<option value="${item.mjaa}">${item.mjaa}_${item.mjab}</option>
									</c:forEach>
								</c:if>
						</select>
					</td>
				</tr>
				<tr>
					<td align="right">发货单单号:</td>
					<td align="left"><input type="text" id="searchMgab" name="mgab"></td>
				</tr>
				<tr>
					<td align="right">状态:</td>
					<td align="left">
						<select id="searchMgac" name="mgac" style="width:150px" class="easyui-combobox">
							<option value="">请选择</option>
							<option value="Y">已审核</option>
							<option value="N">未审核</option>
							<option value="V">已作废</option>
						
						</select>
					</td>
				</tr>		
				<tr>
					<td align="right">单据日期:</td>
					<td align="left"><input type="text" id="searchStartMgad" name="startMgad" class="easyui-datebox">至<input type="text" id="searchEndMgad" name="endMgad" class="easyui-datebox"></td>
				</tr>
				<tr align="center">
					<td colspan="2"><a class="easyui-linkbutton" iconCls="icon-search" href="javascript:void(0);" onclick="searchPurmg()">查询</a></td>
				</tr>
			</table>
		</div>	
	</form>
</div>
	<!-- 添加 -->
		<div id="purmgAdd" icon="icon-save" style="padding:5px;width:400px;height:150px;">
			<form method="post" name="addForm" id="addForm">
				<div class="ToolTip_Form" id="purmgAddForm" onkeydown="if(event.keyCode==13){addPurmg();}">
				<table>
				<tr>
					<td align="right">发货单单别:</td>
					<td align="left">
						<select id="addMgaa" name="mgaa" style="width:150px" class="easyui-combobox">
							<option value="">请选择</option>
								<c:if test="${allCmsmjList != null}">
									<c:forEach var="item" items="${allCmsmjList}" varStatus="num">
										<option value="${item.mjaa}">${item.mjaa}_${item.mjab}</option>
									</c:forEach>
								</c:if>
						</select>
					</td>
				</tr>
				<tr>
					<td align="right">发货单单号:</td>
					<td align="left"><input type="text" id="addMgab" name="mgab"></td>
				</tr>
				<tr>
					<td colspan="2" align="center">
						<a href="#" class="easyui-linkbutton" icon="icon-ok" onclick="addPurmg();">提交</a>
						<a href="#" class="easyui-linkbutton" icon="icon-redo" onclick="addPurmgReset();">重置</a>
					</td>
				</tr>
				</table>
				</div>
			</form>
		</div>
</body>
</html>